<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
        <div id="app">
            <cpn1></cpn1>
        </div>
        <template id="cpn">
            <div>
                <h2>我是标题1</h2>
                <p>我是内容1</p>
            </div>
        </template>
        <script src="../js/vue.js"></script>
        <script>

            // Vue.component('cpn', {
            //     template: '#cpn'
            // })

            const app = new Vue({
                el: '#app',
                data: {
                    message: '你好啊'
                },
                components: {
                    'cpn1': {
                        template: '#cpn',
                    }
                }
            })
        </script>
    </body>
</html>